/**
 * Created by Dalyn on 2017/3/17.
 */
import Relay from "react-relay";

export default class EnterpriseRechargeMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { enterpriseRecharge }`;
    }

    getVariables() {
        return {
            argsInput: {
                accountRecordId:this.props.accountRecordId,
                code:this.props.code,
                amount: this.props.amount,
                tranNo: this.props.tranNo,
                createByName:this.props.examineBy,
                createBy:this.props.examineId
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on enterpriseRechargePayload {
            data {  
                errorCode
                value
                totalResult
                id
                cashMoney
                enAccountRecord{
                    
                    enid
                    
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on enterpriseRechargePayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id
                        cashMoney
                        enAccountRecord{
                            enid
                        }
                       
                    }
                }
            `]
        }];
    }

}